<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>获取checkbox的选中状态</title>
    <script src="../../js/jquery-3.4.1.js"></script>
</head>
<body>
<input type="checkbox" id="check_one" />
</body>
<script>

    let checkOneInput = $('#check_one');

    $(function () {
        buttonInit();
    });

    /**
     * 功能:
     *      1. 使用.is(":checked")这种方式获取checkbox是否选中.
     */
    function buttonInit() {
        checkOneInput.on("click", function () {
            console.log(checkOneInput.is(":checked"));
        });
    }

</script>
</html>